home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8783 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: chronicle.mti.sgi.com!news
  2. From: austern@isolde.mti.sgi.com (Matt Austern)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Date: 26 Feb 1996 17:45:55 GMT
  6. Organization: SGI
  7. Message-ID: <AUSTERN.96Feb26094555@isolde.mti.sgi.com>
  8. References: <00001a73+00002504@msn.com> <4etcmm$lpd@nova.dimensional.com>
  9.     <312515DF.7D3B@cmlj.demon.co.uk> <4gad29$ddp@druid.borland.com>
  10.     <4ggshe$7bk@goanna.cs.rmit.EDU.AU> <4gmp2o$ian@ux1.lmu.edu>
  11.     <312FDB27.4B83@inav.net>
  12. Reply-To: austern@mti.sgi.com
  13. NNTP-Posting-Host: isolde.mti.sgi.com
  14. In-reply-to: JR Crosmer's message of Sat, 24 Feb 1996 21:44:39 -0600
  15.  
  16. In article <312FDB27.4B83@inav.net> JR Crosmer <rainbow@inav.net> writes:
  17.  
  18. > > >(4) C++ in particular has been changing very rapidly.  It seems as if every
  19. > > >    time I turn around there is a new keyword.  
  20. > What is the status of the plain/ordinary/but very noticably forgotten boolean?
  21. > It seems that the biggest difficutly that run into is that everybody needs/wants to
  22. > declare a new version (and they are not all compatible!).  Because C/C++ were never
  23. > polite enough to provide it to begin with (0 or non-zero is hardly a good substitute)
  24. > we end up either creating the (ITEM, NON_ITEM) form, create yet another version
  25. > (my latest is BooleaN, { FalsE, TruE } ).  I think I remember something about
  26. > BOOL in one of the C or C++ stds.  Which compilers use it?  (Borland does not, 
  27. > at least thru 4.0).
  28.  
  29. C does not have a boolean type, but C++ does.  It was added precisely
  30. because every language was defining its own boolean type: it was clear
  31. that a standard boolean type was needed for the sake of avoiding name
  32. clashes.
  33.  
  34. The C++ boolean type is called bool, and its two permissible values
  35. are the manifest constants true and false.  For the sake of
  36. compatibility with old code, there are standard conversions from bool
  37. to int and from int to bool.
  38. -- 
  39. Matt Austern
  40. SGI: MTI Compilers Group
  41. austern@isolde.mti.sgi.com
  42.